<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增服务站')" />
	<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-station-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">服务站名称：</label>
				<div class="col-sm-8">
					<input id="stationName" name="stationName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">服务站状态：</label>
				<div class="col-sm-8">
					<select id="stationState" name="stationState" class="form-control">
						<option value="0">修建中</option>
						<option value="1">营业中</option>
						<option value="2">暂停营业中</option>
						<option value="2">已关闭</option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">服务站电话：</label>
				<div class="col-sm-8">
					<input id="phone" name="phone" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">服务站地址：</label>
				<div class="col-sm-8">
					<input id="address" name="address" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">洗车数量：</label>
				<div class="col-sm-8">
					<input id="washNumber" name="washNumber" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">开业时间：</label>
				<div class="col-sm-8 date">
					<input type="text" name="openTime" class="form-control" id="openTime" placeholder="yyyy-MM-dd">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">显示排名：</label>
				<div class="col-sm-8">
					<input id="stationRanking" name="stationRanking" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">关联文章：</label>
				<div class="col-sm-8">
					<select id="articleId" name="articleId" class="form-control">
						<option>选择</option>
						<option th:each="item : ${articles}" th:value="${item.articleId}" th:text="${item.title}"></option>
					</select>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
		var prefix = ctx + "content/station"
		$("#form-station-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-station-add').serialize());
	        }
	    }

	    $(function () {
			layui.use('laydate', function () {
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#openTime',
                    type: 'date'
                });
            })
        })
	</script>
</body>
</html>
